#!/bin/bash

echo 'GIT_URL='$GIT_URL
echo 'GIT_BRANCH='$GIT_BRANCH
echo 'GIT_COMPILE_MODE='$GIT_COMPILE_MODE
echo 'GIT_BUILD_NUMBER='$GIT_BUILD_NUMBER
echo 'GIT_PROJECT_NAME='$GIT_PROJECT_NAME
echo 'GIT_COMMIT_UUID='$GIT_COMMIT_UUID

cd /tmp
git clone $GIT_URL
cd $GIT_PROJECT_NAME
git checkout $GIT_BRANCH
git push
mkdir $GIT_COMPILE_MODE
cd $GIT_COMPILE_MODE
cmake -DCMAKE_BUILD_TYPE="$GIT_COMPILE_MODE" ..
make